import request from "@/utils/request";
export const shxUserListApi = () => {
  return request({
    url: "/permission/user",
    method: "get",
  });
};
// 获取用户信息

export const getUserListApi = (params) => {
  return request({
    url: "/permission/user",
    method: "get",
    params,
  });
};
// 创建目录
export const addUserApi = (data) => {
  return request({
    url: "/permission/user",
    method: "post",
    data,
  });
};
// 回显
export const showUserApi = (params) => {
  return request({
    url: "/permission/user/" + params,
    method: "get",
  });
};
// 修改
export const editUserApi = (data) => {
  return request({
    url: "/permission/user/" + data.id,
    method: "put",
    data,
  });
};
// 删除
export const deleteUserApi = (id) => {
  return request({
    url: "/permission/user/" + id,
    method: "delete",
  });
};

// 请求角色
export const getroleList = () => {
  return request({
    url: "/permission/role",
    method: "get",
  });
};
// 图片
export const uploadImage = (data) => {
  return request({
    url: "/index/upload?mode=base64&type=image",
    method: "post",
    data,
  });
};
